{FILE {temp_editor}}
<script type="text/javascript">
function notgif(){
	var testStr=document.frmUpdate.SlideFile2.value.toLowerCase();
	if(testStr.lastIndexOf(".jpg")==-1&&testStr.lastIndexOf(".swf")==-1 && document.Sfrm.SlideFile2.value!="") {
	alert("Incorrect file type. Please use a .jpg or a .swf file.");
	}
}

function check_update_template(){
	var oForm = document.frmUpdate;
	if(oForm.name.value == ''){
		oForm.name.focus();
		alert('{TEMPLATE.input_template_name}');
		return;
	}
	if(oForm.id.value != '')
		oForm.sAction.value = 'do_edit';
	oForm.submit();
}

function check_exits_id(e)
{

	var unicode=e.charCode? e.charCode : e.keyCode;
		if(unicode==13)
		{
			doCheckExitsId();
		}
		if ((unicode!=8)&&(unicode!=9)&&(unicode!=37)&&(unicode!=38)&&(unicode!=39)&&(unicode!=40)&&(unicode!=46)&&(unicode!=44))
			{
					if (unicode<48||unicode>57) //if not a number
					if(unicode!=32)
					return false; //disable key press
					
			}
}
function doCheckExitsId()
{
		var id=document.getElementById('product_category_yahoo_id').value;
		if(id=='')
		return;
		
		oXMLHttp = checkXMLHTTP();
		var setRequest = typeof(oXMLHttp.setRequestHeader);
		if ( oXMLHttp && setRequest!="undefined" )
		{
			var myQuery = "&checkid="+id;	
			orderPost( oXMLHttp, "{URL_SITE}admin/?sMod=category_index&sAction=check_exits_id", myQuery, HTTPshowCheckExitsId, true );
		}
}
function HTTPshowCheckExitsId()
{
   if ( typeof(oXMLHttp)==='undefined' )
       return;
    // Return status of XMLHttp object
    if ( oXMLHttp.readyState==4 )
    {
        // if oXMLHttp.status is OK
        if ( oXMLHttp.status==200 )
        {
			sRes = ((oXMLHttp.responseText));
			oJson = sRes.parseJSON(); 			
			 if ( typeof( oJson ) === 'object' )
                {
						var result=oJson['BODY']['RES'];	
						if(result!=false)
						{
							display("{CATEGORY.exits_id}","alert_cat_id")
							document.getElementById('product_category_id').focus();
							
						}
						else
						{
							display("{CATEGORY.not_exits_id}","alert_cat_id");
							
						}
						
						
				}	
		}
        if ( oXMLHttp.status==404)
        {
            alert("Page not found");
        }
    }

}
</script>
<div class="top_list_page"></div>
<form name="frmUpdate" id="frm_cat_new" action="" method="post" enctype="multipart/form-data">
  <input type="hidden" name="sAction" value="do_add_new" />
  <input type="hidden" name="id" value="{id}" />
  <table class="adminform">
    <tr>
      <td>{TEMPLATE.templatename}<span class="require">*</span> :</td>
      <td><input type="text" name="name" id="product_category_name" class="txtbox" value="{name}" />
      </td>
    </tr>
    <tr>
    <td>{TEMPLATE.templatestatus} :</td>
    <td><input type="checkbox" name="status" {status_checked} /> {FORM.active}</td>
  </tr>
  <tr>
  <tr>
    <td>{TEMPLATE.templatedefault} :</td>
    <td><input type="checkbox" name="active_dedault" {active_default_checked} {disabled} /> {FORM.default}</td>
  </tr>
    <tr>
      <td>{TEMPLATE.explaination}:</td>
      <td><textarea name="explanation" id="explanation" class="mceEditor" style="width:100%; height:300px;">{explanation}</textarea></td>
    </tr>
    <tr>
      <td>{TEMPLATE.dagame}:</td>
      <td><textarea name="dagame" id="dagame" class="mceEditor" style="width:100%; height:300px;">{dagame}</textarea></td>
    </tr>
    <tr>
      <td>{TEMPLATE.rank}:</td>
      <td><textarea name="rank" id="rank" class="mceEditor" style="width:100%; height:300px;">{rank}</textarea></td>
    </tr>
    <tr>
      <td>{TEMPLATE.notes}:</td>
      <td><textarea name="notes" id="notes" class="mceEditor" style="width:100%; height:300px;">{notes}</textarea></td>
    </tr>
    <tr>
      <td>{TEMPLATE.size}:</td>
      <td><textarea name="size" id="size" class="mceEditor" style="width:100%; height:300px;">{size}</textarea></td>
    </tr>
  </table>
</form>
